package com.haitaoit.chengquan.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.webkit.WebView;

/**
 * MIWebView
 * <p/>
 * 刘霄鹏
 * <p/>
 * 2015年7月7日 上午11:25:31
 *
 * @version 1.0.0
 */
public class MyWebView extends WebView {

    public MyWebView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public MyWebView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyWebView(Context context) {
        super(context);
    }

    @Override
    public boolean zoomIn() {
        return false;
    }

    @Override
    public boolean zoomOut() {
        return false;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (event.getPointerCount() == 1) {
            return super.onTouchEvent(event);
        } else {
            return false;
        }
    }

    @Override
    @Deprecated
    public boolean canZoomIn() {
        return false;
    }

    @Override
    @Deprecated
    public boolean canZoomOut() {
        return false;
    }

}
